{% extends 'qa_index.html' %}
{% block all_content %}
    <table id="table1" border="1" cellspacing="0" align="center" class="am-table">
        <tr>
            <th>项目</th>
            <th>模板</th>
            <th>事项小类</th>
            <th>事项</th>
            <th>是否需要检查</th>
            <th>进度</th>
            <th>执行人</th>
            <th>备注</th>
        </tr>
        {% if items %}
            {% for item in items %}
                <tr>
                    {% ifchanged item.project.project_name %}
                        <td rowspan={{ items |length }}>{{ item.project.project_name }}</td>
                    {% endifchanged %}
                    <td>{{ item.template.template_name }}</td>
                    <td>{{ item.item_category.item_category_name }}</td>
                    <td>{{ item.item_name }}</td>
                    <td>{{ item.inspect }}</td>
                    <td>
                        <form action="{% url 'task:plan' %}" method="post">
                            {% csrf_token %}
                            <input name="item_plan" value="{{ item.item_plan }}"/>
                            <input name="itemid" type="hidden" value="{{ item.id }}">
                            <input type="submit" value="保存">
                        </form>
                    </td>
                    <td>{{ item.item_executor }}</td>
                    <td>{{ item.remark }}</td>
                </tr>
            {% endfor %}
        {% endif %}
    </table>
{% endblock %}